package com.zjcode.cdcer.mapper;

import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.CityEntity;
import com.zjcode.cdcer.model.SysOrgVillage;
import com.zjcode.cdcer.model.TkmSysOrg;
import java.util.LinkedHashMap;import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;

@Mapper
public interface TkmSysOrgMapper {

    int deleteByPrimaryKey(Long id);

    int insert(TkmSysOrg record);

    int insertSelective(TkmSysOrg record);

    TkmSysOrg selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TkmSysOrg record);

    int updateByPrimaryKey(TkmSysOrg record);

    List<LinkedHashMap<String, Object>> listAllData(@Param("pageData") PageData pageData);
    List<TkmSysOrg> getAllOrgs();

    List<LinkedHashMap<String, Object>> exportOrgData(@Param("pageData") PageData pageData);

    String getRegionCode(@Param("orgId") String orgId);

    String getExFlag2(String orgId);

    List<TkmSysOrg> selectByOrgName(@Param("orgName")String orgName);


    void addBatchOrgVillage(@Param("orgVillages") List<SysOrgVillage> orgVillages);

    void delOrgVillageByOrgId(@Param("orgId") String orgId);

    List<String> getVillageCodesByOrgId(@Param("orgId") String orgId);

    List<String> getVillageCodesByOrgIds(@Param("orgIds") List<String> orgIds);

    String getOrgIdByVillageCode(@Param("villageCode") String villageCode, @Param("orgIds") List<String> orgIds);

    List<SysOrgVillage> getOrgVillagesByOrgIds(@Param("orgIds") List<Object> orgIds);

    List<TkmSysOrg> selByOrgId(@Param("orgIdList") List<Long> orgIdList);

    List<Map<String, Object>> selCityByOrgId(@Param("orgIdList") List<Long> orgIdList);

    int setAccountAndPassword(PageData pageData);

}
